/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package defender;

import org.newdawn.slick.GameContainer;
import org.newdawn.slick.Graphics;
import org.newdawn.slick.Input;
import org.newdawn.slick.SlickException;
import org.newdawn.slick.state.BasicGameState;
import org.newdawn.slick.state.StateBasedGame;
 

/**
 *
 * @author Shane
 */
public class MainMenuState extends BasicGameState {
    
    int stateID = -1;
    MainMenuState (int stateID)
    {
        this.stateID = stateID;
    }
    
    @Override
    public int getID(){
        return stateID;
    }

    @Override
    public void init(GameContainer container, StateBasedGame game) throws SlickException {
    }

    @Override
    public void render(GameContainer container, StateBasedGame game, Graphics g) throws SlickException {
        g.drawString("Press enter to begin!", 310, 275);
        g.drawString("MenuState!", 700, 0);
    }

    @Override
    public void update(GameContainer container, StateBasedGame game, int delta) throws SlickException {
        Input input = container.getInput();
        
        if(input.isKeyPressed(Input.KEY_RETURN)){
            game.enterState(DefenderGame.GAMEPLAYSTATE);
        }
        
    }
    
    
}
